package com.j4dream.property.javabasic.designpattern.filterchain;

public class Client {
    // https://zhuanlan.zhihu.com/p/260027763
    public static void main(String[] args) {
        String requestStr = "1111111,2222222:),中国10.1国庆节....";
        Request request = new Request();
        request.setRequestStr(requestStr);
        Response response = new Response();
        FilterChain filterChain = new FilterChain();
        filterChain.addFilter(new CsrfFilter()).addFilter(new XssFilter());
        filterChain.doFilter(request, response, filterChain);
        System.out.println(request.getRequestStr());
        System.out.println(response.getResponseStr());
    }
}
